package model.trivial_pursuit;

/**
 * Paramètres du Trivial Pursuit
 * @author Aubry Pirian
 *
 */
public final class TPParams {
	
	// Numéros des tables
	public static final int THEME_ID = 0;
	public static final int CARD_ID = 1;
	public static final int ANSWERED_ID = 2;
	
	public static final String THEME_TABLE = "tp_theme";	// table des themes
	public static final String CARD_TABLE = "tp_card";		// table des cartes
	public static final String ANSWERED_TABLE = "tp_answered";		// table des cartes
	
	public static final int NB_COLORS = 6;	// nombre de couleurs
	public static final int MIN_COLOR = 1;
	
	public static final int NB_LEVELS = 2;	// Nombre de niveaux
	public static final int MIN_LEVEL = 1;
	
	
	public static final  String[][] COLORS = {
		{"blue","bleu"},
		{"pink","rose"},
		{"yellow","jaune"},
		{"green","vert"},
		{"brown","marron"},
		{"orange","orange"},
	};
	
	public static final int[] SIZES_THEME_NAME = {1,15};
	public static final int[] SIZES_THEME_COLOR = {1,50};
	public static final int[] SIZES_CARD_QUESTION = {2};
	public static final int[] SIZES_CARD_ANSWER = {1};
	
	// Définition des attributs :
	public static final String[][][] TABLE_ATTRIBUTES = {
		{	// TP_Theme
			{"id","int","3","","true","true","p"},
			{"name","varchar","50","","true","false","u"},
			{"c_"+COLORS[0][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[0][1].toLowerCase(),"true","false"},
			{"c_"+COLORS[1][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[1][1].toLowerCase(),"true","false"},
			{"c_"+COLORS[2][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[2][1].toLowerCase(),"true","false"},
			{"c_"+COLORS[3][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[3][1].toLowerCase(),"true","false"},
			{"c_"+COLORS[4][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[4][1].toLowerCase(),"true","false"},
			{"c_"+COLORS[5][0].toLowerCase(),"varchar",""+SIZES_THEME_COLOR[1],COLORS[5][1].toLowerCase(),"true","false"},
		},
		{	// TP_Card
			{"id","int","5","","true","false","p"},
			{"theme","int","3","","true","false","p"},
			{"color","int","1","","true","false","p"},
			{"level","int","1","1","true","false"},
			{"question","text","","","true","false"},
			{"answer","text","","","true","false"},
		},
		{	// TP_Answered
			{"member","int","7","","true","false"},
			{"match","int","7","","true","false"},
			{"card","int","5","","true","false"},
			{"date","datetime","","","true","false"},
			{"right","enum","'0','1'","0","true","false"},
		},
	};

}
